<tagLib name="html" />
<include file="Public:headerNew" />
<load href="__PUBLIC__/Js/JqueryUI/jquery-ui-1.8.20.custom.min.js" />
<load href="__PUBLIC__/CSS/JqueryUI/jquery-ui-1.8.20.custom.css" />
<load href="__PUBLIC__/Js/Jquery/jquery.form.js" />
<load href='__PUBLIC__/Js/listtolist.js'/>
<div class="titleone"><h1 class="fLeft">添加计量表信息</h1><a href="__URL__/meterclist"><div class="returnimg"></div></a></div>
<div id="result" class="result none"></div>
<div id="main" class="main full" >
<script type="text/javascript">
			W_PRICE={$com.w_price};
			E_PRICE={$com.e_price};
			function submitForm() { 
									// inside event callbacks 'this' is the DOM element so we first 
									// wrap it in a jQuery object and then invoke ajaxSubmit 
							//添加地区信息
						$('#form1').submit();
       					return false;	
								
   			};
			function getprice(){
				
				if ($('#metertype').val()==1){
					$('#m_price').attr("value",W_PRICE);
					$('#meterid').attr("value","水表{$com['meternum1']+1}");
					
				}else{
					$('#m_price').attr("value",E_PRICE);
					$('#meterid').attr("value","电表{$com['meternum2']+1}");
				}
			}
</script>
<form method='post' id='form1' action='__URL__/insertMeterInfo'  enctype="multipart/form-data">



		<!-- ui-dialog -->

<div class="metroTitle">添加新的计量表</div>		
<ul class="pt_list" id="pt_list">

          <li  style="height:250px;">

                    <div class="thumb"><span>1</span></div>

                    <h3>{$com.name}</h3>

                    <div class="thumbr">
<table width="98%" cellpadding=3 cellspacing=3 >
<tr>
  <td width="160" height="20" class="tRight" >表名称：</td>
  <td class="tLeft" ><input type="text"  name="meterid" id="meterid" class="metro" value="水表{$com['meternum1']+1}"></td>
</tr>

<tr>
  <td height="20" class="tRight">表类型：</td>
  <td class="tLeft"><select name="metertype" id="metertype" class="metro" onchange="getprice()">
    <option value="1">水表</option>
    <option value="2">电表</option>
    </select></td>
</tr>
<tr>
	<td height="20" class="tRight">表单价：</td>
	<td align="left" class="center">
	  <input type="text"  name="m_price" id="m_price" class="metro" value="{$com.w_price}">
	 </td>
	</tr>


</table>
</div>
</li>
            </ul>

<div class=cssClear></div>
    <div class="toolPanel">
        <div style="width:99%;margin:5px"><input type="hidden" name="id" id="id" value="{$com.id}" />
        <input type="hidden" name="zoneid" id="zoneid" value="{$com.zoneid}" />
             <div class="impBtnN fRig"><a href="#" onclick="document.forms['form1'].reset()" id="buttonclearBlock" ></a></div>
            <div class="impBtnN fRig"><a href="#" onclick="submitForm();" id="buttonSaveBlock" ></a></div>
</form>           
        </div>
    </div>

</div>